import request from '../utils/request'

//获取系统通知
export function getSysMsg() {
    return request.get('message/announce')
}

//获取私信列表
export function getUserMsgList(){
  return request.get('message/list')
}

//获取私信内容
export function GetUserMessageById(fid){
  return request.get('message/get?fid='+fid)
}

//获取未读消息数
export function GetUnreadCount(){
  return request.get('message/unread')
}

export function sendMsg({fid,content}) {
  return request.post('message/send',{fid,content})
}

//已读公告
export function readAnnounce(aid) {
  return request.post('announce/read',{aid})
}

//已读消息
export function readMsg(fid) {
  return request.post('message/read',{fid})
}

export function deleteMsg(fid) {
  return request.post('message/delete',{fid})
}